package com.tuzhi.base.jpa.domain;


import com.tuzhi.base.jpa.enums.AndOrOperate;
import com.tuzhi.base.jpa.enums.QueryTypeEnum;

import java.io.Serializable;
import java.util.List;

public class QueryConditionBO implements Serializable {

    //过滤属性名
    protected String propertyName;
    //过滤条件值
    protected Object objValue;
    //查询类型
    protected QueryTypeEnum queryTypeEnum;
    //过滤条件多值
    protected List<Object> objList;

    protected AndOrOperate andOrOperate;



    public QueryConditionBO() {
    }

    public QueryConditionBO(String propertyName, QueryTypeEnum queryTypeEnum, AndOrOperate andOrOperate) {
        this.propertyName = propertyName;
        this.queryTypeEnum = queryTypeEnum;
        this.andOrOperate = andOrOperate;
    }

    public QueryConditionBO(String propertyName, QueryTypeEnum queryTypeEnum, Object objValue) {
        this.propertyName = propertyName;
        this.objValue = objValue;
        this.queryTypeEnum = queryTypeEnum;
    }

    public QueryConditionBO(String propertyName, QueryTypeEnum queryTypeEnum, List<Object> objList) {
        this.propertyName = propertyName;
        this.queryTypeEnum = queryTypeEnum;
        this.objList = objList;
    }

    public QueryConditionBO(String propertyName, QueryTypeEnum queryTypeEnum, Object objValue, List<Object> objList) {
        this.propertyName = propertyName;
        this.objValue = objValue;
        this.queryTypeEnum = queryTypeEnum;
        this.objList = objList;
    }

    public QueryConditionBO(String propertyName, Object objValue, QueryTypeEnum queryTypeEnum, List<Object> objList, AndOrOperate andOrOperate) {
        this.propertyName = propertyName;
        this.objValue = objValue;
        this.queryTypeEnum = queryTypeEnum;
        this.objList = objList;
        this.andOrOperate = andOrOperate;
    }

    public String getPropertyName() {
        return propertyName;
    }

    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    public Object getObjValue() {
        return objValue;
    }

    public void setObjValue(Object objValue) {
        this.objValue = objValue;
    }

    public QueryTypeEnum getQueryTypeEnum() {
        return queryTypeEnum;
    }

    public void setQueryTypeEnum(QueryTypeEnum queryTypeEnum) {
        this.queryTypeEnum = queryTypeEnum;
    }

    public List<Object> getObjList() {
        return objList;
    }

    public void setObjList(List<Object> objList) {
        this.objList = objList;
    }


    public AndOrOperate getAndOrOperate() {
        return andOrOperate;
    }

    public void setAndOrOperate(AndOrOperate andOrOperate) {
        this.andOrOperate = andOrOperate;
    }

    @Override
    public String toString() {
        return "QueryConditionBO{" +
                "propertyName='" + propertyName + '\'' +
                ", objValue=" + objValue +
                ", queryTypeEnum=" + queryTypeEnum +
                ", objList=" + objList +
                '}';
    }
}
